import request from '@/config/request.js'
import qs from 'qs'
// 拍照搜题
export const getTextSearch = (data) => {
  return request.post('/app-api/question/app/question/textSearch', data)
}

// 更新搜题时间
export const updateTextSearchTime = (data) => {
  return request.post('/app-api/question/app/question/updateTextSearchTime', data)
}

// 获取题目类型
export const getQuetionType = (params) => {
  return request.get(
    `/app-api/question/App/type/list?${Object.entries(params)
      .map(([key, value]) => `${key}=${value.join(',')}`)
      .join('&')}`
  )
}

// 获取知识点
export const getPointList = (params) => {
  return request.get(
    `/app-api/question/app/knowledge-point/list?${Object.entries(params)
      .map(([key, value]) => `${key}=${value.join(',')}`)
      .join('&')}`
  )
}
